fix: Only take a new attempt on beginAttempt
for items which endAttempt
was invoked to allow skipped items to be navigated freely
#298
+73
−18
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ticket
https://oat-sa.atlassian.net/browse/TR-1241
Summary
A test taker can decide to skip an item for non-linear tests with items configured with multiple attempts, however, it should not take an attempt away, it should rather put the item in
suspend
mode and resume the attempt once the item is displayed again. This is done currently by the actionendCandidateSession
. This is a valid operation but it's currently calling theendAttempt
method underneath.This PR introduces 2 changes to avoid taking attempts away incorrectly:
1- Remove the
endAttempt
call from theendCandidationSession
method;2- Add a new condition before considering a new attempt to check if the attempt was really ended by the test taker (with
endAttempt
call);Dependencies
No dependencies